package javaAPI.System类和Runtime类;
//Runtime

import java.io.IOException;

public class Runtime类 {
    public static void main(String[] args) throws IOException {
        Runtime runtime = Runtime.getRuntime();
        System.out.println("处理机的个数"+runtime.availableProcessors());
        System.out.println("空闲内存量"+runtime.freeMemory()/1024/1024+"mb");
        System.out.println("最大可用内存量"+runtime.maxMemory()/1024/1024+"mb");
        System.out.println("内存总量"+runtime.totalMemory()/1024/1024+"mb");
        //调用记事本
        runtime.exec("notepad.exe");
    }

}
